package com.atguigu.factorymethod;

/**
 * @ClassName TJOrderPizza
 * @Description 天津Pizza 只处理天津pizza
 * @Author HongJian-Yang
 * @Date 2020/6/17 0:26
 * @Version 1.0
 */
public class TJOrderPizza extends OrderPizza {

    @Override
    Pizza createPizza(String orderType) {
        Pizza pizza = null;
        if ("TJCheesePizza".equals(orderType)) {
            pizza = new TJCheesePizza().setName("天津芝士披萨");
        } else if ("TJGreekPizza".equals(orderType)) {
            pizza = new TJGreekPizza().setName("天津希腊披萨");
        }
        return pizza;
    }
}
